package com.knife.bbs.business;

import com.knife.web.tools.EasyDBODAO;
import com.knife.web.tools.IDAO;
/**
 * KnifeWeb Tools的DAO基类，用于扩展支持任何形式的ORM
 * @author Administrator
 *
 */
public abstract class DAOSupportService {
	protected IDAO dao=EasyDBODAO.getInstance();//默认使用EasyDBO作为ORM系统
	//定义几个通过的添、删、改方法
	public boolean add(Object obj)
	{
		return this.dao.save(obj);
	}
	
	public boolean update(Object obj)
	{
		return this.dao.update(obj);
	}
	
	public boolean del(Object obj)
	{
		return this.dao.del(obj);
	}
	
	public IDAO getDao() {
		return dao;
	}

	public void setDao(IDAO dao) {
		this.dao = dao;
	}
}
